From: Roger Pau Monne Date: Thu, 31 Mar 2016 12:56:42 +0000 (+0200) Subject: libxl: fix error message in local_device_attach_cb X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~1359 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f61479c2c35af5894fd4b3da91f0bb4da996e1ab;p=xen.git libxl: fix error message in local_device_attach_cb The fields that are printed might not be set in the case of a failure, which generates a segmentation fault. Signed-off-by: Roger Pau Monné Acked-by: Wei Liu --- diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c index c884de91bf..829badc820 100644 --- a/tools/libxl/libxl.c +++ b/tools/libxl/libxl.c @@ -3209,10 +3209,7 @@ static void local_device_attach_cb(libxl__egc *egc, libxl__ao_device *aodev) rc = aodev->rc; if (rc) { - LOGE(ERROR, "unable to %s %s with id %u", - libxl__device_action_to_string(aodev->action), - libxl__device_kind_to_string(aodev->dev->kind), - aodev->dev->devid); + LOGE(ERROR, "unable locally attach device: %s", disk->pdev_path); goto out; }